package com.sxt.sys.mapper;

import java.util.List;

import com.sxt.sys.domain.Permission;
import com.sxt.sys.vo.PermissionVo;

public interface PermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);
    
    List<Permission> qureyAllPermission(Permission permission);
    
    List<Permission> qureyAllPermissionByMenu(PermissionVo permissionVo);
    //查询排序码的最大值
	Integer loadMaxOrderNumber();

	Integer queryByIdChildrend(Integer id);
	/**
	 * 权限管理
	 * 
	 * @param permissionVo
	 * @return
	 */
	
	List<Permission> queryAllPermissionByTypePermission(PermissionVo permissionVo);

	List<Permission> queryPermissionByRoleId(Integer id);

	List<Permission> queryApartPermissonByUserId(String menuTypeMenu, Integer userId);

	List<Permission> queryPermissionByUserId(String menuTypePermission, Integer id);
}